      SUBROUTINE QUIKVIS5(IDTARG,TARGNAMES,KTARGTYP,TARGPARM,IERR)
      IMPLICIT REAL*8 (A-H,O-Z)
C
C THIS ROUTINE IS PART OF THE QUIKVIS PROGRAM.  IT IS THE DRIVER FOR
C COMPUTING AND REPORTING TARGET AVAILABILITY.  THESE ARE DONE BY LOWER
C LEVEL ROUTINES QUIKVIS5A AND QUIKVIS5B.
C
C
C VARIABLE      DIM       TYPE I/O DESCRIPTION
C --------      ---       ---- --- -----------
C
C IDTARG      MAXTARGS     I*4  I  DESCRIBED IN QUIKVIS(=MAIN) PROLOGUE.
C
C TARGNAMES   MAXTARGS    CH*16 I  DESCRIBED IN QUIKVIS(=MAIN) PROLOGUE.
C
C KTARGTYP    MAXTARGS     I*4  I  DESCRIBED IN QUIKVIS(=MAIN) PROLOGUE.
C
C TARGPARM NPARMS,MAXTARGS R*8  I  DESCRIBED IN QUIKVIS(=MAIN) PROLOGUE.
C
C IERR           1         I*4  O  ERROR RETURN FLAG
C                                  =0, NO ERROR
C                                  =OTHERWISE, ERROR.
C
C***********************************************************************
C
C BY C PETRUZZO/GFSC/742.   2/86.
C       MODIFIED....
C
C***********************************************************************
C
      INCLUDE 'QUIKVIS.INC'
C
      CHARACTER*16 TARGNAMES(MAXTARGS)
      INTEGER*4 IDTARG(MAXTARGS)
      REAL*8 TARGPARM(NPARMS,MAXTARGS)
      INTEGER*4 KTARGTYP(MAXTARGS)
C
      IBUG = 0
      LUBUG = 19
C
      IF(IBUG.NE.0) WRITE(LUBUG,9001)
     *   (ITARG,TARGPARM(1,ITARG)*DEGRAD,TARGPARM(2,ITARG)*DEGRAD,
     *      ITARG=1,80)
 9001 FORMAT(/,' QUIKVIS5. DEBUG. ENTRY VALUES. FIRST 80.'/,
     *       (' ITARG=',I3,'  RA,DEC=',2G13.5))
C
C
C
C DO COMPUTATIONS AND OUTPUT THE RESULTS.
C
C*** RUN USING SPECIFIC TARGETS
C
      IF(.NOT.DOSURVEY) THEN
        CALL QUIKVIS5A(IDTARG,TARGNAMES,KTARGTYP,TARGPARM,IERR)
        END IF
C
C*** SKY SURVEY RUN
C
      IF(DOSURVEY) THEN
        CALL QUIKVIS5B(IDTARG,TARGNAMES,KTARGTYP,TARGPARM,IERR)
        END IF
C
      RETURN
C
C***********************************************************************
C
C
C**** INITIALIZATION CALL. PUT GLOBAL PARAMETER VALUES INTO THIS
C     ROUTINE'S LOCAL VARIABLES.
C
      ENTRY QVINIT5
C
      CALL QUIKVIS999(-1,R8DATA,I4DATA,L4DATA)
      RETURN
C
C***********************************************************************
C
      END
